package com.cq.hd.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cq.hd.order.api.dto.GroupBuyOrderItemQueryDto;
import com.cq.hd.order.api.dto.GroupBuyOrderItemUpdateDto;
import com.cq.hd.order.api.vo.GroupBuyOrderDetailVo;
import com.cq.hd.order.po.TbGroupBuyOrderItemPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TbGroupBuyOrderItemMapper extends BaseMapper<TbGroupBuyOrderItemPo> {

    TbGroupBuyOrderItemPo selectByOrderId(@Param("orderId") Long orderId);

    List<TbGroupBuyOrderItemPo> selectByGroupBuyOrderId(@Param("groupBuyOrderId") Long groupBuyOrderId);

    List<TbGroupBuyOrderItemPo> selectByDto(GroupBuyOrderItemQueryDto param);

    List<GroupBuyOrderDetailVo> selectByOrderIds(@Param("orderIds") List<Long> orderIds);

    int updateStatus(GroupBuyOrderItemUpdateDto groupBuyOrderItemUpdateDto);

}
